import * as types from './mutation-types'
import api from '@/api'

export const actions = {
    async profile({commit}) {
        const resp = await api.user.profile()
        if (resp.done) {
            commit(types.SET_PROFILE, resp.data)
            commit('setIsLogin', true, {root:true})
        }
    }
}
